﻿#ifndef _VETH_DATA_H_
#define _VETH_DATA_H_

#include "Event.h"
#include "DataCache.h"
#include <functional>
#include "VirInterface.h"

class RawIoInterface;

class VethData : public Event ,public VirInterface
{
public:
    VethData(const std::string& dev, std::function<void(DataCache)> func);
    ~VethData();

    int init();
    int shutdown();
    
    int VSendData(DataCache& data, int msecond);

private:

    virtual void CycleTask();

private:

    std::string     m_if_mac;

    std::function<void(DataCache)> m_func;
    RawIoInterface*  m_data_io;
};
typedef std::shared_ptr<VethData>  VethDataPtr;

#endif